package com.wn.ticket.service.impl;

import com.wn.ticket.entity.Comment;
import com.wn.ticket.mapper.CommentMapper;
import com.wn.ticket.service.CommentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CommentServiceIpml implements CommentService {

    @Autowired
    private CommentMapper commentMapper;

    @Override
    public void add(Comment comment) {
        commentMapper.add(comment);
    }

    @Override
    public List<Comment> getByCondition(Comment comment) {
        return commentMapper.getByCondition(comment);
    }

    @Override
    public void update(Comment comment) {
        commentMapper.update(comment);
    }

    @Override
    public Comment getCommentById(int id) {
        return commentMapper.getCommentById(id);
    }
}
